﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using AuctionModel;
using DataBaseController;

namespace AuctionLogicController
{
    public static class AuctionController
    {

        public static void CreateAuction(Auction auction)
        {
            DbCtr.CreateAuction(auction);
        }
        public static void AddItemToAuction(Auction auction, Item item)
        {
            DbCtr.AddItemToAuction(item, auction);
        }
        public static Auction GetAuction(int auctionId)
        {
            return DbCtr.GetAuction(auctionId);
        }
        public static List<Auction>GetAllAuctions()
        {
            return DbCtr.ShowAllAuctions();
        }
        public static List<Item>GetAllItems()
        {
            return DbCtr.GetAllItems();
        }
        public static void BidOnItem(Bid bid)
        {
            DbCtr.BidOnItem(bid);
        }
        public static int GetTopBid(Item item)
        {
            return DbCtr.GetTopBid(item);
        }

    }
}
